package com.sbs.gaoxinqutoilet.entity;

import com.google.gson.Gson;

import java.io.Serializable;
import java.util.List;

/**
 * If you change her, tell me
 * sometimes I believe compiler ignores all my comments
 * Created by gyyak46 on 2017/6/22.
 */
public class BuyItemEntity implements Serializable{


    /**
     * rows : [{"amount":"50","begin_date":"2017-03-20","buy_cert_id":"257569139","buy_cert_no":"","c_name":"盐酸","end_date":"2017-03-20","field1":"","field2":"","field3":"","isrptprint":0,"opt_time":"2017-03-20","pass_amount":50,"print_count":0,"rqt_org_name":"宜昌新洋丰肥业有限公司","spy_org_name":"湖北新洋丰肥业股份有限公司","state_id":101,"state_name":"审批中","step_time":{"date":20,"day":1,"hours":14,"minutes":44,"month":2,"nanos":0,"seconds":26,"time":1489992266000,"timezoneOffset":-480,"year":117},"t_name":"许成圣","t_tel":"6513008","unit_name":"吨"},{"amount":"240","begin_date":"1987-11-08","buy_cert_id":"1133533","buy_cert_no":"","c_name":"盐酸","end_date":"1987-11-08","field1":"","field2":"","field3":"","isrptprint":0,"opt_time":"2010-05-27","pass_amount":0,"print_count":0,"rqt_org_name":"宜昌新洋丰肥业有限公司","spy_org_name":"宜昌市广益化工有限责任公司","state_id":102,"state_name":"驳回","step_time":{"date":27,"day":4,"hours":16,"minutes":42,"month":4,"nanos":0,"seconds":21,"time":1274949741000,"timezoneOffset":-480,"year":110},"t_name":"邓中兴","t_tel":"6513065","unit_name":"升"}]
     * total : 2
     */

    private String total;
    private List<RowsBean> rows;

    public static BuyItemEntity objectFromData(String str) {

        return new Gson().fromJson(str, BuyItemEntity.class);
    }

    public String getTotal() {
        return total;
    }

    public void setTotal(String total) {
        this.total = total;
    }

    public List<RowsBean> getRows() {
        return rows;
    }

    public void setRows(List<RowsBean> rows) {
        this.rows = rows;
    }

    public static class RowsBean implements Serializable{

        public String getBohuiyy() {
            return bohuiyy;
        }

        public void setBohuiyy(String bohuiyy) {
            this.bohuiyy = bohuiyy;
        }

        /**
         *
         *
         * amount : 50   申请数量
         * begin_date : 2017-03-20
         * buy_cert_id : 257569139
         * buy_cert_no :
         * c_name : 盐酸   化学品
         * end_date : 2017-03-20
         * field1 :
         * field2 :
         * field3 :
         * isrptprint : 0
         * opt_time : 2017-03-20   申请时间
         * pass_amount : 50
         * print_count : 0
         * 	"buildstate": "未改造",
         * rqt_org_name : 宜昌新洋丰肥业有限公司
         * spy_org_name : 湖北新洋丰肥业股份有限公司   供货
         * state_id : 101
         * state_name : 审批中    状态
         * step_time : {"date":20,"day":1,"hours":14,"minutes":44,"month":2,"nanos":0,"seconds":26,"time":1489992266000,"timezoneOffset":-480,"year":117}
         * t_name : 许成圣     经办人
         * t_tel : 6513008     电话
         * unit_name : 吨    单位
         * bohuiyy
         */


        private boolean isEdit;

        public boolean isEdit() {
            return isEdit;
        }

        public void setEdit(boolean edit) {
            isEdit = edit;
        }

        private String buildstate;

        public String getBuildstate() {
            return buildstate;
        }

        public void setBuildstate(String buildstate) {
            this.buildstate = buildstate;
        }

        private String bohuiyy;
        private String amount;
        private String begin_date;
        private String buy_cert_id;
        private String buy_cert_no;
        private String c_name;
        private String end_date;
        private String field1;
        private String field2;
        private String field3;
        private int isrptprint;
        private String opt_time;
        private double pass_amount;
        private int print_count;
        private String rqt_org_name;
        private String spy_org_name;
        private int state_id;
        private String state_name;
        private StepTimeBean step_time;
        private String t_name;
        private String t_tel;
        private String unit_name;

        public static RowsBean objectFromData(String str) {

            return new Gson().fromJson(str, RowsBean.class);
        }

        public String getAmount() {
            return amount;
        }

        public void setAmount(String amount) {
            this.amount = amount;
        }

        public String getBegin_date() {
            return begin_date;
        }

        public void setBegin_date(String begin_date) {
            this.begin_date = begin_date;
        }

        public String getBuy_cert_id() {
            return buy_cert_id;
        }

        public void setBuy_cert_id(String buy_cert_id) {
            this.buy_cert_id = buy_cert_id;
        }

        public String getBuy_cert_no() {
            return buy_cert_no;
        }

        public void setBuy_cert_no(String buy_cert_no) {
            this.buy_cert_no = buy_cert_no;
        }

        public String getC_name() {
            return c_name;
        }

        public void setC_name(String c_name) {
            this.c_name = c_name;
        }

        public String getEnd_date() {
            return end_date;
        }

        public void setEnd_date(String end_date) {
            this.end_date = end_date;
        }

        public String getField1() {
            return field1;
        }

        public void setField1(String field1) {
            this.field1 = field1;
        }

        public String getField2() {
            return field2;
        }

        public void setField2(String field2) {
            this.field2 = field2;
        }

        public String getField3() {
            return field3;
        }

        public void setField3(String field3) {
            this.field3 = field3;
        }

        public int getIsrptprint() {
            return isrptprint;
        }

        public void setIsrptprint(int isrptprint) {
            this.isrptprint = isrptprint;
        }

        public String getOpt_time() {
            return opt_time;
        }

        public void setOpt_time(String opt_time) {
            this.opt_time = opt_time;
        }

        public double getPass_amount() {
            return pass_amount;
        }

        public void setPass_amount(double pass_amount) {
            this.pass_amount = pass_amount;
        }

        public int getPrint_count() {
            return print_count;
        }

        public void setPrint_count(int print_count) {
            this.print_count = print_count;
        }

        public String getRqt_org_name() {
            return rqt_org_name;
        }

        public void setRqt_org_name(String rqt_org_name) {
            this.rqt_org_name = rqt_org_name;
        }

        public String getSpy_org_name() {
            return spy_org_name;
        }

        public void setSpy_org_name(String spy_org_name) {
            this.spy_org_name = spy_org_name;
        }

        public int getState_id() {
            return state_id;
        }

        public void setState_id(int state_id) {
            this.state_id = state_id;
        }

        public String getState_name() {
            return state_name;
        }

        public void setState_name(String state_name) {
            this.state_name = state_name;
        }

        public StepTimeBean getStep_time() {
            return step_time;
        }

        public void setStep_time(StepTimeBean step_time) {
            this.step_time = step_time;
        }

        public String getT_name() {
            return t_name;
        }

        public void setT_name(String t_name) {
            this.t_name = t_name;
        }

        public String getT_tel() {
            return t_tel;
        }

        public void setT_tel(String t_tel) {
            this.t_tel = t_tel;
        }

        public String getUnit_name() {
            return unit_name;
        }

        public void setUnit_name(String unit_name) {
            this.unit_name = unit_name;
        }

        public static class StepTimeBean {
            /**
             * date : 20
             * day : 1
             * hours : 14
             * minutes : 44
             * month : 2
             * nanos : 0
             * seconds : 26
             * time : 1489992266000
             * timezoneOffset : -480
             * year : 117
             */

            private int date;
            private int day;
            private int hours;
            private int minutes;
            private int month;
            private int nanos;
            private int seconds;
            private long time;
            private int timezoneOffset;
            private int year;

            public static StepTimeBean objectFromData(String str) {

                return new Gson().fromJson(str, StepTimeBean.class);
            }

            public int getDate() {
                return date;
            }

            public void setDate(int date) {
                this.date = date;
            }

            public int getDay() {
                return day;
            }

            public void setDay(int day) {
                this.day = day;
            }

            public int getHours() {
                return hours;
            }

            public void setHours(int hours) {
                this.hours = hours;
            }

            public int getMinutes() {
                return minutes;
            }

            public void setMinutes(int minutes) {
                this.minutes = minutes;
            }

            public int getMonth() {
                return month;
            }

            public void setMonth(int month) {
                this.month = month;
            }

            public int getNanos() {
                return nanos;
            }

            public void setNanos(int nanos) {
                this.nanos = nanos;
            }

            public int getSeconds() {
                return seconds;
            }

            public void setSeconds(int seconds) {
                this.seconds = seconds;
            }

            public long getTime() {
                return time;
            }

            public void setTime(long time) {
                this.time = time;
            }

            public int getTimezoneOffset() {
                return timezoneOffset;
            }

            public void setTimezoneOffset(int timezoneOffset) {
                this.timezoneOffset = timezoneOffset;
            }

            public int getYear() {
                return year;
            }

            public void setYear(int year) {
                this.year = year;
            }
        }
    }
}
